<template>
    <div class="goodsdesc-container">
        <h3>{{title}}</h3>
        <hr>
        <div class="content">
            {{goods.sub2}}
        </div>
    </div>
</template>

<script>
    export default {
        name: "goodsdesc",
        data(){
            return {
                title:this.$route.title,
                goods:[],

            }
        },
        methods:{
            getGoodsDesc(){
                this.$axios.get('/query?key=ee22a1e78b90506df4c51628ccfae9f6&rn=10&pn=0&catalog_id=242')
                    .then(res=>{
                        console.log(res)
                        this.list=res.data.result.data
                        for(var i=0;i<res.data.result.data.length;i++){
                            if(this.title==res.data.result.data[i].title){
                                this.goods=res.data.result.data[i]
                            }
                        }
                    })
            }

        },
        created() {
            this.getGoodsDesc();
        }
    }
</script>

<style scoped>
.goodsdesc-container h3{
    font-size:16px;
    color:#226aff;
    text-align: center;
    margin: 15px 0;
}
    .content{
        padding: 4px;
    }
</style>